package com.spring.common.allocation;

import com.cloopen.rest.sdk.CCPRestSDK;

/**
 * Created by anpushang on 2016/9/26.
 */
public class RLCallbackExposer {

    private static final String subAccountSid = "0d500421839811e6997a6c92bf2c165d";//子帐号

    private static final String subAccountToken = "998b23d8829339452a1f200682afbf88";//子帐号token

    private static final String appId = "8aaf070857514dd70157645eeb87077d"; // appId

    private static final String serviceAddress = "app.cloopen.com";//服务地址

    private static final String servicePort = "8883";//服务端口

    private static CCPRestSDK restAPI = null;


    public void initRLCallback(){
        createCCPRestSDK();
    }

    public static CCPRestSDK getCCPRestSDKApi(){
        return restAPI != null ? restAPI : createCCPRestSDK();
    }

    public static CCPRestSDK createCCPRestSDK(){
        restAPI = new CCPRestSDK();
        restAPI.init(serviceAddress,servicePort);
        restAPI.setSubAccount(subAccountSid,subAccountToken);
        restAPI.setAppId(appId);
        return restAPI;
    }




}
